<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">


<ui:composition template="/templates/templateComum.xhtml">
	<ui:define name="conteudo">
		<h:form>
	
				<h:panelGroup rendered="#{mBControleAcesso.usuario.permissoes.contains('ADMIN')}">
		        	<div id="mensagens">
		        	<p:commandButton value="Entrar como Administrador" action="#{mBRedirect.redirecionar}">
						<f:setPropertyActionListener target="#{mBRedirect.redirecionamento}" value="/educacao/pages/admin/index.jsf"/>
		        	</p:commandButton>
		        	</div>
		        </h:panelGroup>
		        <h:panelGroup rendered="#{mBControleAcesso.usuario.permissoes.contains('ALUNO')}">
		        	<div id="mensagens">
		        	<p:commandButton value="Entrar como Aluno" action="#{mBRedirect.redirecionar}">
						<f:setPropertyActionListener target="#{mBRedirect.redirecionamento}" value="/educacao/pages/aluno/index.jsf"/>
		        	</p:commandButton>
		        	</div>
		        </h:panelGroup>
		        <h:panelGroup rendered="#{mBControleAcesso.usuario.permissoes.contains('PROFESSOR')}">
		        	<div id="mensagens"><p:commandButton value="Entrar como Professor" action="#{mBRedirect.redirecionar}">
						<f:setPropertyActionListener target="#{mBRedirect.redirecionamento}" value="/educacao/pages/professor/index.jsf"/>
		        	</p:commandButton></div>
		        </h:panelGroup>
		        <h:panelGroup rendered="#{mBControleAcesso.usuario.permissoes.contains('DIRETOR')}">
		        	<div id="mensagens"><p:commandButton value="Entrar como Diretor" action="#{mBRedirect.redirecionar}">
						<f:setPropertyActionListener target="#{mBRedirect.redirecionamento}" value="/educacao/pages/diretor/index.jsf"/>
		        	</p:commandButton></div>
		        </h:panelGroup>     	
		        
		        
		 </h:form>
	</ui:define>
</ui:composition>
</html>